<template>
  <div id="app">
    <div class="divs flex-r-s-c">
      <img
        :src="obj_banhao.logo"
        alt=""
        style="width: auto; height: 40px; margin-left: 5vw; margin-right: 20vw"
      />
      <div class="tabBox flex-r-c-c">
        <router-link
          tag="div"
          v-for="(v, i) in path"
          :key="i"
          :to="v.path"
          class="flex-c-c-c path_list"
          >{{ v.name }}
        </router-link>
      </div>
    </div>
    <div style="width: 100vw; height: 60px"></div>
    <router-view />
    <div
      class="flex-c-c-c"
      style="padding: 40px 25vw; background-color: rgba(0, 0, 0, 1)"
    >
      <div style="width: 50vw; height: auto">
        <div class="flex-r-b-c">
          <div
            style="width: 40%; height: 1px; background-color: #ffffff66"
          ></div>
          <div class="flex-c-c-c" style="width: 20%">
            <img
              :src="obj_banhao.logo"
              alt=""
              style="width: auto; height: 30px"
            />
            <!--       <span style="font-size: 14px; color: #ffffff"
              >人生就像一场旅途</span -->
            >
          </div>
          <div
            style="width: 40%; height: 1px; background-color: #ffffff66"
          ></div>
        </div>
        <div class="flex-r-b-c" style="margin: 20px 0;">
          <div class="flex-r-b-s" style="width: 50%; height: auto">
            <div class="flex-c-s-s">
              <router-link
                tag="span"
                to="/home"
                style="font-size: 18px; color: #fff; cursor: pointer"
                >首页
              </router-link>
              <router-link
                tag="span"
                to="/product"
                style="
                  font-size: 14px;
                  color: #fff;
                  margin-top: 15px;
                  cursor: pointer;
                "
                >产品中心</router-link
              >
              <router-link
                tag="span"
                to="/journalism"
                style="
                  font-size: 14px;
                  color: #fff;
                  margin-top: 15px;
                  cursor: pointer;
                "
                >最新资讯</router-link
              >
              <router-link
                tag="span"
                to="/notice"
                style="
                  font-size: 14px;
                  color: #fff;
                  margin-top: 15px;
                  cursor: pointer;
                "
                >公告中心</router-link
              >
            </div>
            <div class="flex-c-s-s">
              <router-link
                tag="span"
                to="/history"
                style="font-size: 18px; color: #fff; cursor: pointer"
              >
                关于</router-link
              >
              <router-link
                tag="span"
                to="/history"
                style="
                  font-size: 14px;
                  color: #fff;
                  margin-top: 15px;
                  cursor: pointer;
                "
                >关于我们</router-link
              >
            </div>
            <div class="flex-c-s-s">
              <router-link
                tag="span"
                to="/me"
                style="font-size: 18px; color: #fff; cursor: pointer"
                >联系
              </router-link>
              <span style="font-size: 14px; color: #fff; margin-top: 15px"
                >客服电话：{{ pohone }}</span
              >
            </div>
          </div>
          <div class="flex-c-c-c">
            <span  style="font-size: 18px; color: #fff; cursor: pointer">微信公众号</span>
            <img style="width: 100px; height: 100px; margin-top: 10px;" src="./assets/gzhewm.png" alt="">
          </div>
          <!-- <div class="flex-r-s-e">
              <img src="./assets/logo.png" alt="" class="img_s" style="width:auto;height:30px;">
              <img src="./assets/logo.png" alt="" class="img_s" style="width:auto;height:30px;">
              <img src="./assets/logo.png" alt="" class="img_s" style="width:auto;height:30px;">
              <img src="./assets/logo.png" alt="" class="img_s" style="width:auto;height:30px;">
          </div> -->
        </div>
        <div
          style="
            width: 100%;
            height: 1px;
            background-color: #ffffff66;
            margin-bottom: 20px;
          "
        ></div>
        <div style="width: 100%" class="flex-c-c-c">
          <span style="font-size: 12px; color: #fff">
            <a
              href="https://beian.miit.gov.cn/#/Integrated/index"
              style="color: #fff; text-decoration: none"
              target="blank"
              >{{ obj_banhao.icp }}</a
            >
          </span>
          <span style="font-size: 12px; color: #fff"
            >互联网药品信息证书：（藏）非经营性-2018-0001</span
          >
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { Message } from "element-ui";
export default {
  name: "App",
  data() {
    return {
      path: [
        {
          name: "首页",
          path: "/home",
        },
        {
          name: "发展简史",
          path: "/history",
        },
        {
          name: "新闻资讯",
          path: "/journalism",
        },
        {
          name: "企业公告",
          path: "/notice",
        },
        {
          name: "产品中心",
          path: "/product",
        },
        {
          name: "联系我们",
          path: "/me",
        },
      ],
      pohone: "",
      obj_banhao: [],
    };
  },
  mounted() {
    let headers = {
      token: this.$md5(this.$key + this.$dataTime()),
      rtimes: this.$dataTime(),
    };
    this.$axios
      .post(this.$base + "/Index/navigationBar", headers)
      .then((res) => {
        if (res.data.code == 2000) {
          this.path = res.data.data;
        } else {
          Message.error(res.data.msg);
        }
        console.log(res);
      })
      .catch(function (error) {
        Message.error(error.message);
      });
    this.$axios
      .post(this.$base + "/Index/aboutUs", headers)
      .then((res) => {
        if (res.data.code == 2000) {
          this.pohone = res.data.data.phone;
        } else {
          Message.error(res.data.msg);
        }
        console.log(res);
      })
      .catch(function (error) {
        Message.error(error.message);
      });
    this.$axios
      .post(this.$base + "/Index/getIcpLogo", headers)
      .then((res) => {
        if (res.data.code == 2000) {
          this.obj_banhao = res.data.data;
        } else {
          Message.error(res.data.msg);
        }
        console.log(res);
      })
      .catch(function (error) {
        Message.error(error.message);
      });
  },
};
</script>

<style>
body,
head {
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto;
  overflow-x: hidden;
  /* overflow: hidden; */
}

p {
  padding: 0;
  margin: 0;
}

.cur {
  cursor: pointer;
  margin-bottom: 50px;
}

#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  height: auto;
  background-color: #f2f2f2;
}

.divs {
  width: 100%;
  border-width: 0px;
  position: absolute;
  left: 0px;
  top: 0px;
  height: 60px;
  -ms-overflow-x: hidden;
  overflow-x: hidden;
  -ms-overflow-y: hidden;
  overflow-y: hidden;
  background-color: rgba(144, 122, 110, 1);
  background-image: none;
  border: none;
  border-radius: 0px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
}

.tabBox{
  width: 100%;
  height: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}

.divs .path_list {
  margin: 0px 20px;
  font-weight: bold;
  color: rgb(255, 255, 255);
  font-size: 16px;
  height: 30px;
  border-bottom: 2px solid rgba(144, 122, 110, 1);
  cursor: pointer;
}

.img_s {
  opacity: 0.8;
  margin-left: 20px;
}

.img_s:hover {
  opacity: 1;
}

.divs .router-link-active {
  border-bottom-color: rgb(255, 255, 255);
}

.divs .path_list:hover {
  opacity: 0.8;
}

.flex-r-s-c {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

.flex-r-s-e {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: flex-end !important;
}

.flex-r-b-e {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

.flex-r-a-c {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-around !important;
  align-items: center !important;
}

.flex-r-b-c {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.flex-r-c-c {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
}

.flex-r-s-s {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

.flex-r-a-s {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-around !important;
  align-items: flex-start !important;
}

.flex-r-b-s {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
}

.flex-r-c-s {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: flex-start !important;
}

.flex-c-s-c {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

.flex-c-c-e {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-end !important;
}

.flex-cr-s-c {
  display: flex !important;
  flex-direction: column-reverse !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

.flex-c-a-c {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-around !important;
  align-items: center !important;
}

.flex-c-b-c {
  display: flex !important;
  flex-direction: column !important;
  /* justify-content: space-between !important; */
  /*  align-items: center !important; */
}

.flex-c-b-e {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
}

.flex-c-c-c {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

.flex-c-s-s {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

.flex-c-a-s {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-around !important;
  align-items: flex-start !important;
}

.flex-c-b-s {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
}

.flex-r-e-b {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: baseline !important;
}

.flex-c-c-s {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
}
</style>
